﻿@model AlertaFiscal.Web.Models.PagerModel

<ul class="pager">
    @if (@Model.Current == 1)
    {
        <li class="previous disabled"><a onclick="javascript:void(0);">&larr; Primeira</a></li>     
        <li class="disabled"><a onclick="javascript:void(0);">Anterior</a></li>
    }
    else
    {
        <li class="previous" data-controller="@Model.Controller" data-index="1" ><a onclick="javascript:void(0);">&larr; Primeira</a></li>
        <li data-controller="@Model.Controller" data-index="@Model.GetStartIndexAnt()" ><a onclick="javascript:void(0);">Anterior</a></li>
  
    }

    @if (Model.GetStartIndexProx() > Model.TotalPages)
    {
        <li class="disabled"><a onclick="javascript:void(0);">Próxima</a></li>
        <li class="next disabled"><a onclick="javascript:void(0);">Ultima &rarr;</a></li>     
    }
    else
    {
        <li data-controller="@Model.Controller" data-index="@Model.GetStartIndexProx()" ><a onclick="javascript:void(0);">Próxima</a></li>
        <li class="next" data-controller="@Model.Controller" data-index="@Model.GetLastIndex()" ><a onclick="javascript:void(0);">Ultima &rarr;</a></li>
    }
</ul>
<div id="ErroList"></div>
